﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ViewMaker.Core.Controls;
using System.ComponentModel.DataAnnotations;
using System.Windows.Input;
using ViewMaker.Core;
using ViewMaker;

namespace HDInsightStudio
{
    [View(ViewControlType.Grid, Title = "Code Viewer")]
    [ViewProperty(GridViewControl.Properties.Margin, "10")]
    [ViewProperty(GridViewControl.Properties.WindowWidth, 600)]
    [ViewProperty(GridViewControl.Properties.WindowHeight, 300)]
    [ViewProperty(GridViewControl.Properties.HeaderPosition, LayoutHeaderPosition.Hidden )]
    public class TextViewModel : ViewModelBase
    {
        [View(ViewControlType.TextBox)]
        [ViewProperty(TextBoxViewControl.Properties.IsMultiline, true)]
        [ViewProperty(TextBoxViewControl.Properties.IsReadOnly, true)]
        [ViewProperty(TextBoxViewControl.Properties.GridHeight, "*")]
        [ViewProperty(TextBoxViewControl.Properties.VerticalAlignment, LayoutVerticalAlignment.Stretch)]
        public string Text { get; set; }

        [ViewProperty(ViewControl.Properties.Height, 20)]
        [Display(Name = "Close")]
        public ICommand CloseCommand { get { return CreateViewCommand(ViewCommands.Close); } }

    }
}

